package com.suny.single_thread_execution;

/**
 * 单线模式，每次只能由一个线程执行
 */
public class Main {
    public static void main(String[] args) {
        System.out.println("Test Thread`````");
        Gate gate = new Gate();

        new UserThread(gate, "Alice", "Alaska").start();
        new UserThread(gate, "Bobby", "Brazil").start();
        new UserThread(gate, "Chris", "Canada").start();
    }
}
